
using king.models;
using Microsoft.EntityFrameworkCore;

namespace king.Db
{
    public class DemoDb:DbContext
    {
        private readonly string Sql="server=.;database=DemoDb;uid=sa;pwd=123456";

        public DbSet<Product> Products{get;set;}

        public DbSet<Category> Categories{get;set;}

        protected override  void OnConfiguring(DbContextOptionsBuilder  builder)
        {
            builder.UseSqlServer(Sql);
        }


    }
}